package com.dilidili.service.impl;

import java.util.List;
import java.util.Map;

import com.dilidili.esentity.VideoPojo;
import com.dilidili.mapper.CollectVideoMapper;
import com.dilidili.mapper.FansMapper;
import com.dilidili.mapper.NiceVideoMapper;
import com.dilidili.mapper.VideoMapper;
import com.dilidili.service.IVideoService;
import com.domain.Video;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-03-31
 */
@Service
public class VideoServiceImpl implements IVideoService
{
    @Resource
    private VideoMapper videoMapper;
    @Resource
    private NiceVideoMapper niceVideoMapper;
    @Resource
    private CollectVideoMapper collectVideoMapper;
    @Resource
    private FansMapper fansMapper;
    /**
     * 查询【请填写功能名称】
     * 
     * @param videoId 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public Video selectVideoByVideoId(Long videoId)
    {
        return videoMapper.selectVideoByVideoId(videoId);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param video 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<Video> selectVideoList(Video video)
    {
        return videoMapper.selectVideoList(video);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param video 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertVideo(Video video)
    {
        return videoMapper.insertVideo(video);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param video 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateVideo(Video video)
    {
        return videoMapper.updateVideo(video);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param videoIds 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteVideoByVideoIds(Long[] videoIds)
    {
        return videoMapper.deleteVideoByVideoIds(videoIds);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param videoId 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteVideoByVideoId(Long videoId)
    {
        return videoMapper.deleteVideoByVideoId(videoId);
    }

    @Override
    public List<Map> animatedRandomVideo(Long smallzoneId) {
        return videoMapper.animatedRandomVideo(smallzoneId);
    }

    @Override
    public List<Map> animatedRandomVideoLeaderboard(Long smallzoneId) {
        return videoMapper.animatedRandomVideoLeaderboard(smallzoneId);
    }

    @Override
    public Video animatedRandomVideoById(Long videoId) {
        return  videoMapper.animatedRandomVideoById(videoId);
    }

    @Override
    public void updateCount(Video video) {
        videoMapper.updateCount(video);
    }

    @Override
    public List<Map> animatedRandomVideoFour() {
        return videoMapper.animatedRandomVideoFour();
    }

    @Override
    public List<Map> animatedRandomVideoSix() {
        return videoMapper.animatedRandomVideoSix();
    }

    @Override
    public List<Map> Submission(Integer userId, Integer bigzoneId, Integer videoState) {
        return videoMapper.Submission( userId, bigzoneId, videoState);
    }

    @Override
    public Object delVideoOnline(Integer videoid) {
        return videoMapper.delVideoOnline(videoid);
    }

    @Override
    public Object getVideoBarrageCount(Integer videoid) {
        return videoMapper.getVideoBarrageCount(videoid);
    }

    @Override
    public Object getVideoBarrageList(Integer videoid) {
        return videoMapper.getVideoBarrageList(videoid);
    }

    @Override
    public List<Map> getNice(Integer userId, Integer videoId) {
        return niceVideoMapper.getNice(userId,videoId);
    }

    @Override
    public List<Map> getCollect(Integer userId, Integer videoId) {
        return collectVideoMapper.getCollect(userId,videoId);
    }

    @Override
    public List<Map> getFans(Integer userId, Integer bigvId) {
        return fansMapper.getFans(userId,bigvId);
    }

    @Override
    public Map getNiceNum(Integer videoId) {
        return niceVideoMapper.getNiceNum(videoId);
    }

    @Override
    public Map getCollectNum(Integer videoId) {
        return collectVideoMapper.getCollectNum(videoId);
    }


    @Override
    public List<VideoPojo> animatedRandomVideoAll() {
        return videoMapper.animatedRandomVideoAll();
    }

    @Override
    public VideoPojo animatedRandomVideoId(Long videoId) {
        return videoMapper.animatedRandomVideoId(videoId);
    }

    @Override
    public void updateImg(Integer videoId) {
        videoMapper.updateImg(videoId);
    }

    @Override
    public List<Map> byUserId(Integer userId) {
        return videoMapper.byUserId(userId);
    }

    @Override
    public List<Map> manageReviews(String videoTitle, Integer userId) {
        return videoMapper.manageReviews(videoTitle,userId);
    }

    @Override
    public List<Video> queryByUserId(Long userId) {
        return videoMapper.queryByUserId(userId);
    }

    @Override
    public List<Video> queryByUserIdContribute(Long userId) {
        return videoMapper.queryByUserIdContribute(userId);
    }

    @Override
    public void Tombstone(Long videoId) {
        videoMapper.Tombstone(videoId);
    }

    /**
     * 随机视频
     * @return
     */
    @Override
    public List<Video> randomVideo() {
        return videoMapper.randomVideo();
    }

    /**
     *
     * @param userId 用户id
     * @return
     */
    @Override
    public Long easyNum(Long userId) {
        return videoMapper.easyNum(userId);
    }
}
